const { miniProgram } = wx.getAccountInfoSync()
const { envVersion } = miniProgram

let env = {
  baseURL: 'https://gmall-prod.atguigu.cn/mall-api'
}

switch (envVersion) {
  case 'develop': //开发
    env.baseURL = 'https://gmall-prod.atguigu.cn/mall-api'
    break

  case 'trial': //体验
    env.baseURL = 'https://gmall-prod.atguigu.cn/mall-api'
    break

  case 'release': //正式
    env.baseURL = 'https://gmall-prod.atguigu.cn/mall-api'
    break

  default:
    env.baseURL = 'https://gmall-prod.atguigu.cn/mall-api'
    break
}
export { env }
